“Hotplugging” refers to the capability of adding, removing, or replacing a device in a computer system without shutting down or rebooting the computer system. A well-known example of hotplugging is the Universal Serial Bus (USB) or the Peripheral Component Interconnect (PCI) Express that allows users to add or remove peripheral components such as storage components during operation of a computer system.
Before a hotplug device can be removed or replaced, a system administrator needs to unconfigure the device. The device driver associated with the device needs to free any system resources (e.g., memory) that have been allocated for the device. The device driver also needs to ensure that interrupts and I/O are disabled on the device. The guest operating system needs to synchronize with the device, for example, complete writing out data to a storage device.
A virtual machine system can also provide hotplug capabilities. In a virtual machine system, it is possible to hotplug remove a device (which can be a physical device or an emulated device) that is controlled by a guest running on a virtual machine. To safely remove the device, a hypervisor typically sends a request to the guest and waits for an acknowledgment from the guest. However, if the guest is rebooted before responding to the request, the hypervisor may receive an acknowledgment from the guest after a long delay, or may not receive an acknowledgment at all. Thus, the rebooting of a guest often causes problems in hotplugging.